﻿using SingleUserMall.Mall.Form;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static SingleUserMall.Items.Item;

namespace SingleUserMall.Items.Form
{
    public class CategoryItemSearchForm:ItemSearchForm
    {
        /// <summary>
        /// 价格区间最小值
        /// </summary>
        public decimal? MinPrice { get; set; }
        /// <summary>
        /// 价格区间最大值
        /// </summary>
        public decimal? MaxPrice { get; set; }
        /// <summary>
        /// 是否新品
        /// </summary>
        public bool IsNew { get; set; }
        /// <summary>
        /// 排序选项（0：综合，1：价格升序，2：价格倒序，3：销量从高到低）
        /// </summary>
        public ItemOption Option { get; set; }
        /// <summary>
        /// 是否团购
        /// </summary>
        public bool? IsGroup { get; set; }
        /// <summary>
        /// 是否抢购
        /// </summary>
        public bool? IsTimeLimit { get; set; }
        /// <summary>
        /// 是否砍价
        /// </summary>
        public bool? IsBargain { get; set; }
    }

    public enum ItemOption : int
    {
        /// <summary>
        /// 综合
        /// </summary>
        Normal = 0,
        /// <summary>
        /// 价格升序
        /// </summary>
        Price = 1,
        /// <summary>
        /// 价格倒序
        /// </summary>
        PriceDesc = 2,
        /// <summary>
        /// 销量从高到低
        /// </summary>
        SaleDesc = 3,
    }
}
